<h1>New Post</h1>

<?php
echo validation_errors('<div class="error">', '</div>');
?>

<?php
$title = '';
$content = 'Post Here.';

if (!isset($news)){
	echo form_open('news/add');
} else {
	echo form_open('news/change');
	echo form_hidden('id', $news['id']);
	$title = $news['title'];
	$content = $news['content'];
}

$input_params = array ('id' => 'Title_Box2', 'name' => 'title', 'autocomplete' => 'off');
$textarea_params = array('id' => 'News_Area', 'name' => 'content', 'cols' => 60, 'rows' => 10);


echo form_label('Title: ', 'Title_Box'); 							//<label id='Title_Box' for='title'>Title:</label>;
echo form_input($input_params, set_value('title', $title)) .br(1); 		//<input id='Title_Box2' type='text' name='title' value='' autocomplete='off' />;
echo form_textarea($textarea_params, set_value('content', $content)) .br(1); //<textarea id='News_Area' name='content' cols='60' rows='10', value='' >Post Here </textarea>;
echo form_submit('submit', 'Post');

?>


